package vip.meeet.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

import java.util.HashMap;

@Component
public class LoginLogic {

    @Autowired
    private ApplicationEventPublisher applicationEventPublisher;

    public void login(){
        HashMap<String, String> params = new HashMap<>();
        params.put("name","tim");
        params.put("age","25");
        LoginEvent loginEvent = new LoginEvent(params);
        applicationEventPublisher.publishEvent(loginEvent);
    }

}
